using UnityEngine;

public class UIhole : MonoBehaviour
{
	public TweenAlpha selfalpha;

	public bool isshow;

	private float curshowtime;

	public float limitedtime;

	private void Update()
	{
		if (isshow)
		{
			curshowtime += Time.deltaTime;
			if (curshowtime > limitedtime)
			{
				curshowtime = 0f;
				isshow = false;
				UIController.instance.holesnum--;
				NGUITools.SetActive(base.gameObject, state: false);
			}
		}
	}

	public void showhole()
	{
		isshow = true;
		curshowtime = 0f;
		selfalpha.ResetToBeginning();
		selfalpha.PlayForward();
		NGUITools.SetActive(base.gameObject, state: true);
	}
}
